package ebcs.database.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import ebcs.database.bean.TbMessage;
import ebcs.database.bean.TbMessageDetail;
import ebcs.database.bean.TbMessageInfor;
import ebcs.database.bean.TbTemplate;
import ebcs.database.mybatis.dao.MessageMapper;
import ebcs.database.service.MessageServiceImp;

@Service
public class MessageServiceImpl implements MessageServiceImp{

	@Autowired
    private MessageMapper messageInforDao;
	 
	@Override
	public List<TbMessageInfor> selectMessageInfor(TbMessage message) {
		// TODO Auto-generated method stub
		return messageInforDao.selectMessageInfor(message);
	}

	@Override
	public void deleteMessage(String messageId) {
		// TODO Auto-generated method stub
		messageInforDao.deleteMessage(messageId);
	}

	@Override
	public void deleteMessageDetail(String messageId) {
		// TODO Auto-generated method stub
		messageInforDao.deleteMessageDetail(messageId);
	}
	
	@Override
	public List<TbTemplate> getTempList() {
		// TODO Auto-generated method stub
		return messageInforDao.getTempList();
	}

	@Override
	public void addMessage(TbMessageInfor message) {
		// TODO Auto-generated method stub
		messageInforDao.addMessage(message);
	}

	@Override
	public void updateMessage(TbMessageInfor message) {
		// TODO Auto-generated method stub
		messageInforDao.updateMessage(message);
	}

	@Override
	public void addMessageDetail(TbMessageDetail tbMessageDetail) {
		// TODO Auto-generated method stub
		messageInforDao.addMessageDetail(tbMessageDetail);
	}

	@Override
	public List<TbMessageDetail> selectMsgDetailAll(String messageId){
		return this.messageInforDao.selectDetailAll(messageId);
	}
}
